{% macro date_filters(start_date, end_date) %}
  {# NOTE(willkg): This assumes start_date and end_date are in UTC #}
  <fieldset class="date-filters">
    <div class="date-from">
      <label for="date_from">From</label>
      <input type="date" name="date_date_from" value="{{ start_date.strftime('%Y-%m-%d') }}">
      <input type="time" name="date_time_from" value="{{ start_date.strftime('%H:%M') }}">
      UTC
    </div>
    <div class="date-to">
      <label for="date_to">To</label>
      <input type="date" name="date_date_to" value="{{ end_date.strftime('%Y-%m-%d') }}">
      <input type="time" name="date_time_to" value="{{ end_date.strftime('%H:%M') }}">
      UTC
    </div>
  </fieldset>

  <p class="date-shortcuts">
    Shortcuts: last
    <a href="#" data-range="1d">24 hours</a> -
    <a href="#" data-range="3d">3 days</a> -
    <a href="#" data-range="7d" class="selected">7 days</a> -
    <a href="#" data-range="2w">14 days</a> -
    <a href="#" data-range="1M">1 month</a> -
    <a href="#" data-range="3M">3 months</a> -
    <a href="#" data-range="6M">6 months</a> |
    <a href="#" data-range="dayends">day ends</a>
  </p>
{%- endmacro %}
